Syntax:
FirstDateOfDayInQuarter(dateexpr, NumZ{day})
Description:
Returns the date of the first instance of the specified day in the quarter
of the date specified. For
example, this function could return the date of the first Monday of the
next quarter.
Parameter Description
dateexpr A the date to be used when determining the first instance of the day.
NumZ{day} The day to check for.
ò vbSunday (1) - Sunday
ò vbMonday (2) - Monday
ò vbTuesday (3) - Tuesday
ò vbWednesday (4) - Wednesday
ò vbThursday (5) - Thursday
ò vbFriday (6) - Friday
ò vbSaturday (7) - Saturday
Example:
Sub
Main
'return the date of the first Sunday of this quarter.
firstSundayofthisquarter = FirstDateOfDayInQuarter(Now(),1)
'return the date of the first Monday of next
quarter.
firstMondayofnextquarter = FirstDateOfDayInQuarter(DateAdd(1,"q",Now()),2)
See Also:IsLeapYear